package ${domain}.module.wsys.req;

import org.hibernate.validator.constraints.Length;
import ${domain}.frame.base.BaseUpdateRequest;
import ${domain}.frame.validation.Select;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * TokensUpdateRequest - 通行证更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class TokensUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 登录令牌
     */
    @NotBlank(message = "[token]登录令牌不能为空")
    @Length(min = 0, max = 50, message = "[token]登录令牌长度不合法(0-50)")
    private String token;

    /**
     * 用户主键
     */
    @NotNull(message = "[userId]用户主键不能为NULL")
    private Long userId;

    /**
     * 用户名称
     */
    @NotBlank(message = "[userName]用户名称不能为空")
    @Length(min = 0, max = 50, message = "[userName]用户名称长度不合法(0-50)")
    private String userName;

    /**
     * 用户别名
     */
    private String userAlias;

    /**
     * 登录时间
     */
    @NotNull(message = "[loginTime]登录时间不能为NULL")
    private Date loginTime;

    /**
     * 有效时间
     */
    @NotNull(message = "[validTime]有效时间不能为NULL")
    private Date validTime;

    /**
     * 是否有效
     */
    @NotNull(message = "[valid]是否有效不能为NULL")
    private Boolean valid;

    /**
     * 部门主键
     */
    private Long deptId;

    /**
     * 部门代码
     */
    @Length(min = 0, max = 50, message = "[deptCode]部门代码长度不合法(0-50)")
    private String deptCode;

    /**
     * 部门名称
     */
    @Length(min = 0, max = 100, message = "[deptName]部门名称长度不合法(0-100)")
    private String deptName;

    /**
     * 终端类型.
     * WEB:网页
     * API:终端
     */
    @Select({"WEB", "API"})
    private String terminal;

    /**
     * 终端地址
     */
    @Length(min = 0, max = 50, message = "[terminalIp]终端地址长度不合法(0-50)")
    private String terminalIp;

    /**
     * 终端信息
     */
    @Length(min = 0, max = 500, message = "[terminalInfo]终端信息长度不合法(0-500)")
    private String terminalInfo;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getToken() {
        return this.token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserAlias() {
        return this.userAlias;
    }

    public void setUserAlias(String userAlias) {
        this.userAlias = userAlias;
    }

    public Date getLoginTime() {
        return this.loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Date getValidTime() {
        return this.validTime;
    }

    public void setValidTime(Date validTime) {
        this.validTime = validTime;
    }

    public Boolean getValid() {
        return this.valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public Long getDeptId() {
        return this.deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptCode() {
        return this.deptCode;
    }

    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    public String getDeptName() {
        return this.deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getTerminal() {
        return this.terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public String getTerminalIp() {
        return this.terminalIp;
    }

    public void setTerminalIp(String terminalIp) {
        this.terminalIp = terminalIp;
    }

    public String getTerminalInfo() {
        return this.terminalInfo;
    }

    public void setTerminalInfo(String terminalInfo) {
        this.terminalInfo = terminalInfo;
    }
}
